<template>
	<view class="frame">
		<view class="allwrap" v-if="current == 0">
			<view style="height: 22rpx;"></view>
			<view class="frame-record flexal" v-for="(item,index) in record" :key="index" @click="go('/pages6/metting/signDetail')">
				<view style="flex: 1;">
					<view>3人签到</view>
					<view class="flexal" style="margin-top: 20rpx;">
						<!-- <view class="frame-block"  :style="{'background':item.status ? '#366EF4':'#858A99'}" ></view> -->
						<view class="record-text flexal" style="color: #858A99;">2024/08/05 10:00</view>
					</view>
				</view>
				<image src="/static/right.png" style="width: 14rpx;height: 24rpx;"></image>
			</view>
		</view>
		<view class="allwrap" v-if="current == 1">
			<view style="height: 22rpx;"></view>
			<view class="frame-record flexal" v-for="(item,index) in record" :key="index" @click="go('/pages6/metting/startVote?type='+0)">
				<view style="flex: 1;">
					<view>投票主题名称名称名称名称名称1</view>
					<view class="flexal" style="margin-top: 20rpx;">
						<!-- <view class="frame-block"  :style="{'background':item.status ? '#366EF4':'#858A99'}" ></view> -->
						<view class="record-text flexal" style="color: #858A99;">2024/08/05 10:00</view>
					</view>
				</view>
				<image src="/static/right.png" style="width: 14rpx;height: 24rpx;"></image>
			</view>
		</view>
		<view class="allwrap" v-if="current == 2">
			<view style="height: 22rpx;"></view>
			<view class="frame-record flexal" v-for="(item,index) in record" :key="index" @click="go('/pages6/metting/startVote?type='+0)">
				<image :src="fileIcon(item.suffix)" style="width: 60rpx;height: 60rpx;"></image>
				<view style="margin-left: 32rpx;">
					<view>2024年工作文档.docx</view>
					<view class="flexal" style="margin-top: 10rpx;">
						<view class="record-text flexal" style="color: #858A99;font-size: 22rpx;">创建人：张三 2024/08/05 10:00</view>
					</view>
				</view>
				<!-- <image src="/static/right.png" style="width: 14rpx;height: 24rpx;"></image> -->
			</view>
		</view>
		<!-- 电话提示滑动快 -->
		<movablearea1 :movaheight="movaheightAll" v-if="movableareaShow" @editMovaheightAll="editMovaheightAll" :movaTop="movaTopAll"></movablearea1>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				record:[
					{
						status:0,
						suffix:'xlx'
					},
					{
						status:1,
						suffix:'ppt'
					},{
						status:0,
						suffix:'pdf'
					},{
						status:0,
						suffix:'word'
					},
				],
				current:2,					//0:签到记录列表 1:投票记录列表  2:文档列表
			}
		},
		onLoad(option) {
			if(option.current == 1){
				uni.setNavigationBarTitle({
					title:'投票'
				});
			}else if(option.current == 2){
				uni.setNavigationBarTitle({
					title:'文档'
				});
			}else{
				uni.setNavigationBarTitle({
					title:'签到'
				});
			}
			this.current = option.current
		},
		methods: {
			// 文件消息图标
			fileIcon(suffix){
				let fileIcon = []
				fileIcon['ppt'] = '/static/message/ppt.png'
				fileIcon['pdf'] = '/static/message/pdf.png'
				fileIcon['word'] = '/static/message/word.png'
				fileIcon['xlx'] = '/static/message/xlx.png'
				fileIcon['package'] = '/static/message/package.png'
				console.log('fileIcon',fileIcon)
				
				return fileIcon[suffix]
			},
		}
	}
</script>

<style lang="less">
	.frame{
		background: #F3F4F6;
	}
	.frame-record{
		padding: 0rpx 32rpx;
		margin-top: 32rpx;
		width: 686rpx;
		height: 146rpx;
		background: #FFFFFF;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		
		.frame-block{
			width: 18rpx;
			height: 18rpx;
			background: #366EF4;
			border-radius: 50%;
		}
		.record-text{
			// margin-left: 12rpx;
			font-weight: 400;
			font-size: 26rpx;
			color: #366EF4;
		}
	}
	
</style>
